//
//  AppGlobalManager.h
//  Chehu_User
//
//  Created by Luke on 15/10/13.
//  Copyright (c) 2015年 Chehu. All rights reserved.
//

#import <Foundation/Foundation.h>
//#import "EMSDK.h"

@class TYUserInfoModel,TYTempInfoModel;

@interface TYGlobalManager : NSObject


/** 当前登录选择的店铺信息 */
@property (nonatomic, strong) TYUserInfoModel *currentShopInfo;

/** 所有临时信息Model数组 */
@property (nonatomic, strong) NSMutableArray <TYTempInfoModel *> *tempInfoModelArr;

/** 是否登录了*/
@property (nonatomic, assign) BOOL isLogin;

/**< 上一次登录用户缓存手机号 */
@property (nonatomic, strong) NSString *lastLoginAccount;

/**< 是否查询支付密码成功 */
@property (nonatomic, assign) BOOL hasRequestPayPwdFlagSuccess;

/**< 是否有设置支付密码 */
@property (nonatomic, assign) BOOL payPwdSetFlag;

/** IM登录状态*/
@property(nonatomic,assign)BOOL imLoginStatus;
/** IM登录用户名*/
@property(nonatomic,copy)NSString *imUserName;



#pragma mark -================ 单例对象操作 ================

/**
 *  获取UserInfoModelManage单例对象 AppGlobalManager
 */
+ (instancetype)shareInstance;

/**
 *  保存单例到数据库
 */
+ (void)saveGlobalManagerToFMDB;

/**
 *  注销登录处理
 */
+ (void)logoutDealWithFMDB;

/**
 *  启动程序时从数据库初始化用户信息单例对象
 */
+ (TYGlobalManager *)getAppGlobalManagerFromDB;

///** 环信IM 登录*/
//+ (void)hxIMRegisteredAdLoginWithUserName:(NSString *)userName completion:(void (^)(NSString *aUsername, EMError *aError))aCompletionBlock;
/** 获取所有未读消息*/
+(NSInteger)getAllUnreadCount;

@end
